#ifndef ADDNEWITEM_H
#define ADDNEWITEM_H

#include <QDialog>
#include <QHash>

enum Groups{
    Python,
    PyQt,
    QML,
    Other
};

enum Items{
    Class,
    File,
    Module,
    ClassForm,
    Form,
    Resource,
    QMLItem,
    Js,
    AnyFile,
    Dir
};


class Node;
class QListWidgetItem;
namespace Ui {
    class AddNewItem;
}

class AddNewItem : public QDialog
{
    Q_OBJECT

public:
    explicit AddNewItem(Node * node, QWidget *parent = 0);
    virtual ~AddNewItem();

    QStringList openAfter();
private slots:
    void groupChanged(QListWidgetItem*, QListWidgetItem*);
    void itemChanged(QListWidgetItem*, QListWidgetItem*);
    void onAccept();
private:
    void createClass();
    void createPyFile();
    void createModule();
    void createClassForm();
private:
    Ui::AddNewItem *ui;
    Node * _node;

    QHash< Groups, QString> _groups;
    QHash< Groups, QHash<Items, QString> > _items;
    QHash< Groups, bool> _disabled;
    QHash<Items, QString> _descr;
    QStringList _openAfter;
};

#endif // ADDNEWITEM_H
